package com.aidong.liveVideo.biz.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.aidong.liveVideo.biz.TrnLiveVideoBiz;
import com.aidong.liveVideo.dao.TrnLiveVideoDao;
import com.aidong.liveVideo.entity.LiveVideoComment;
import com.aidong.liveVideo.entity.LiveVideoMoreList;
import com.aidong.liveVideo.entity.TrnLiveVideoComment;
import com.aidong.liveVideo.entity.TrnLiveVideoList;
import com.aidong.liveVideo.entity.TrnLiveVideoPraise;
import com.aidong.liveVideo.entity.TrnVideoLimit;
import com.aidong.videoComment.entity.Author;


@Service("trnLiveVideoBiz")
public class TrnLiveVideoBizImpl implements TrnLiveVideoBiz {
	
	private TrnLiveVideoDao trnLiveVideoDao;
	@Autowired
	public void setTrnLiveVideoDao(TrnLiveVideoDao trnLiveVideoDao) {
		this.trnLiveVideoDao = trnLiveVideoDao;
	}
	/**
	 * 直播列表
	 */
	@Override
	public List<TrnLiveVideoList> getLiveVideoList(Map<String, Object> map) {
		return trnLiveVideoDao.getLiveVideoList(map);
	}
	/**
	 * 观看人数
	 */
	@Override
	public List<TrnLiveVideoList> getLivePersionCount(Map<String, Object> map){
		return trnLiveVideoDao.getLivePersionCount(map);
	}
	/**
	 * 获取无直播时的轮播图
	 */
	public TrnLiveVideoList getLiveHomeList(){
		return trnLiveVideoDao.getLiveHomeList();
	}
	/**
	 * 直播下的视频分类
	 * @return
	 */
	@Override
	public List<TrnVideoLimit> getVideoLimitList(){
		return trnLiveVideoDao.getVideoLimitList();
	}
	
	/**
	 * 今日以后直播
	 * @param map
	 * @return
	 */
	@Override
	public List<LiveVideoMoreList> getLiveVideoMoreList(Map<String, Object> map){
		return trnLiveVideoDao.getLiveVideoMoreList(map);
	}
	/**
	 * 直播详情
	 */
	@Override
	public TrnLiveVideoList getLiveVideoDetail(Map<String, Object> map) {
		return trnLiveVideoDao.getLiveVideoDetail(map);
	}

	/**
	 * 观看人列表
	 * @param map
	 * @return
	 */
	public List<Author> getLivePersionList(Map<String, Object> map){
		return trnLiveVideoDao.getLivePersionList(map);
	}
	/**
	 * 保存评论
	 * @param videoLiveComment
	 * @return
	 */
	@Override
	public int addLiveVideoComment(TrnLiveVideoComment videoLiveComment){
		return trnLiveVideoDao.addLiveVideoComment(videoLiveComment);
	}
	/**
	 * 评论列表
	 * @return
	 */
	@Override
	public List<LiveVideoComment> getLiveVideoCommentlList(Map<String,Object> map){
		return trnLiveVideoDao.getLiveVideoCommentlList(map);
	}
	/**
	 * 点赞
	 * @param liveVideoPraise
	 * @return
	 */
	@Override
	public int addLiveVideoPraise(TrnLiveVideoPraise liveVideoPraise){
		return trnLiveVideoDao.addLiveVideoPraise(liveVideoPraise);
	}
	/**
	 * 点赞和评论的人数
	 * @param map
	 * @return
	 */
	@Override
	public TrnLiveVideoList getLiveVideoLike(Map<String, Object> map){
		return trnLiveVideoDao.getLiveVideoLike(map);
	}
	/**
	 * 添加观看人
	 * @param map
	 * @return
	 */
	public int addLiveVideoPersion(Map<String,Object> map){
		return trnLiveVideoDao.addLiveVideoPersion(map);
	}
	/**
	 * 正在直播中人数和直播名称
	 * @param map
	 * @return
	 */
	public TrnLiveVideoList getLivePersion(Map<String, Object> map){
		return trnLiveVideoDao.getLivePersion(map);
	}
}